home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 039a / bccapp.zip / HELP.C < prev    next >
C/C++ Source or Header  |  1991-09-15  |  1KB  |  81 lines

  1. /*
  2.  *
  3.  * Online-Help system.
  4.  *
  5.  * (C) 1990 Vision Software
  6.  *
  7.  * $Id: help.c 1.2002 91/05/03 14:29:23 pcalvin beta $
  8.  *
  9.  * Comments:
  10.  *
  11.  * Online quick-help system.  Bottom row may be used as direction/program
  12.  * information
  13.  *
  14.  */
  15. #include <stdhdr.h>
  16. #include <adl.h>
  17.  
  18. #include "lowlevel.h"
  19.  
  20. /*
  21.  *    In C++ 2.0, a Static data member is not DEFINED unless
  22.  * it is initialized.
  23.  */
  24. SZ HELP::szCurrent = szNil;
  25.  
  26. /*
  27.  * Saves previous help text..
  28.  */
  29. HELP::HELP(SZ sz)
  30.     {
  31.     szLast = szCurrent;
  32.     szCurrent = sz;
  33.     
  34.     ShowCurrent();
  35.     }
  36.  
  37. /*
  38.  * Restores previous help text..
  39.  */
  40. HELP::~HELP()
  41.     {
  42.     szCurrent = szLast;
  43.     
  44.     ShowCurrent();
  45.     }
  46.  
  47. /*
  48.  * Initializes Global Help.  Clears bottom screen etc..
  49.  *    szADLVersion is a macro that contains a string version
  50.  * of the current release
  51.  */
  52. VOID HELP::Start()
  53.     {
  54.     szCurrent = szNil;
  55.     
  56.     ClearRow(rowGlobalWindowBottom,1,colGlobalWindowRight,coRed,coCyan);
  57.     DisplayString(rowGlobalWindowBottom,2,"ADL v" szADLVersion " \xB3",coRed,coCyan);
  58.     }
  59.  
  60. /*
  61.  * Replaces the currently active QuickHelp
  62.  */
  63. VOID HELP::Replace(SZ sz)
  64.     {
  65.     if (sz != szNil)
  66.         szCurrent = sz;
  67.  
  68.     ShowCurrent();
  69.     }
  70.  
  71. /*
  72.  * Update quick help at bottom of the screen
  73.  */
  74. VOID HELP::ShowCurrent()
  75.     {
  76.     CURSOR crs(fFalse);
  77.  
  78.     if (szCurrent != szNil)
  79.         DisplayString(rowGlobalWindowBottom,14,SzTempPaddedFromSzCch(szCurrent,65),coRed,coCyan);
  80.     }
  81.